/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bbd;

import bbd.crawler.Crawler;
import bbd.crawler.job.ArtistNamesJob;
import bbd.crawler.url.SimpleURLAppendHandler;
import bbd.crawler.url.SimpleURLReplaceHandler;
import bbd.crawler.url.fwk.URLHandlerInterface;
import java.util.ArrayList;

/**
 *
 * @author amochakr
 */
public class TestMain {

    //--------------------------------------------------------------------------
    /**
     * @param args the command line arguments
     */
    public static void main ( String[] args ) throws Exception {

        /*
        String url = "http://en.wikipedia.org/w/api.php?" +
                                "action=query&" +
                                "titles=#{1}&" +
                                "prop=revisions&" +
                                "labels=#{2}&" +
                                "format=xml";

        ArrayList mXn2DList = new ArrayList();

        ArrayList temp = new ArrayList();

        temp.add ( "A1" );
        temp.add ( "B1" );
        temp.add ( "C1" );

        mXn2DList.add (temp);

        temp = new ArrayList();

        temp.add ( "X1" );
        temp.add ( "Y1" );
        temp.add ( "Z1" );

        mXn2DList.add (temp);

        URLHandlerInterface urlHandler = new SimpleURLReplaceHandler();

        urlHandler.init ( url, mXn2DList );

        while ( urlHandler.hasNext() ) {

            Crawler.debug ( "Main", "Replaced url - " + urlHandler.getUrl() );
        }

        url = "http://api.mtvnservices.com/1/artist/browse/";

        urlHandler = new SimpleURLAppendHandler();

        urlHandler.init (url, temp);

        while ( urlHandler.hasNext() ) {

            Crawler.debug ( "Main", "Appended url - " + urlHandler.getUrl() );
        }
        */

        new ArtistNamesJob().execute();

    } // end method main

} // end class TestMain
